package cn.usian.dao;

import cn.usian.entity.Dish;
import cn.usian.entity.DishDTO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface DishMapper extends BaseMapper<Dish> {


    @Update("update dish set is_deleted='1' where id=#{id}")
    void updateByIds(Long id);

    //List<Dish> findPage(String name);

    @Update("update dish set status=#{status} where id=#{id}")
    void updateone(@Param("id") Long id,@Param("status") Integer status);


    List<DishDTO> findPage(Page<DishDTO> page1,@Param("name") String name);





}
